package ca.jerg.data;

import java.util.ArrayList;

public interface IErgDataShape
{
	public final static int FIRST = 0;
	public final static int LAST = -1;
	
	/**
	 * Return the specified data point of the shape.
	 * @param index		index into shape data points to return
	 */
	public ErgPoint getPoint( int index );
	
	/**
	 * Return the number of data points that make up the shape.
	 */
	public int getNumberOfPoints();
	
	/**
	 * Modify a data point in a shape.
	 * 
	 * @param index		data point index to modify
	 * @param time		time index of data point
	 * @param watts		wattage level of data point
	 * @return true on success, false otherwise
	 */
	public boolean setData( int index, double time, int watts );
		
	/**
	 * Modify a data point in a shape.
	 * 
	 * @param index		data point index to modify
	 * @param point		data point to add to shape
	 * @return true on success, false otherwise
	 */
	public boolean setData( int index, ErgPoint point );
	
	
	/**
	 * Return all data points that make up the shape.
	 */
	public ArrayList getData();
	
	/**
	 * Write the data shape to the console via standard out.
	 */
	public void write();
}
